package com.whfp.coky.ui.task.act.rfid

import android.view.View
import com.whfp.coky.R
import com.whfp.coky.databinding.RfidFindViewBinding
import com.whfp.coky.ui.base.RFIDAct
import com.whfp.coky.ui.task.vm.rfid.RFIDFindVM
import com.whfp.coky.widget.clicks

/**
 *
 *任务-RFID标签锁定
 * created by coky on 2022/4/1
 */
class RFIDFindAct : RFIDAct<RFIDFindVM>() {



    override fun initData() {
        getTitleBar()?.title = "任务-RFID寻卡"
    }




    override fun loadView(){//加载stub,默认显示二维码相关，重写
       toast("没有二次加载动作????")
    }

    override fun onCommitClicked() {//任务提交

    }

    override fun baseTips() {
        vBinding.tvTips.visibility = View.GONE
        vBinding.vs.layoutResource = R.layout.rfid_find_view
        stubBinding = RfidFindViewBinding.bind(vBinding.vs.inflate())
        (stubBinding as RfidFindViewBinding).btnRwtj.clicks {
            onCommitClicked()
        }
        (stubBinding as RfidFindViewBinding).btnQk.clicks {
            (stubBinding as RfidFindViewBinding).let {
                it.etProjectName.setText("")
                it.etNumSelect.setText("")
                it.etObjName.setText("")
            }
        }
    }

}